<?php

use Illuminate\Database\Seeder;

class GroupTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
    	DB::table('groups')->truncate();

    	DB::table('groups')->insert(array(
	        [
	            'name' => '管理员',
	            'level' => 10, 
	            'menu' => '["1","2","3","4","5","6","7","13","14","15","9","10","11","12"]',
	            'permissions' => '["web","web-create","web-show","web-edit","web-renew","web-delete","web-permission","web-import","order-manager",
	            				   "progress-tongji","renew","customer","customer-edit","customer-delete","customer-show","customer-move",
	            				   "contract","user", "user-create","user-edit","user-delete","group","group-create","group-delete","department",
	            				   "department-create","department-edit","department-delete","edit-info-edit","menu","menu-create","menu-edit",
	            				   "menu-delete","other-order","other-order-create","other-order-edit","other-order-delete"]', 
	        ],
	        [
	            'name'  => '总监',
	            'level' => 8,
	            'menu' => '["5","6","12"]',
	            'permissions' => '["web-show","order-manager","customer","customer-edit","customer-show","customer-move","edit-info-edit"]',
	        ],
	        [
	            'name' => '设计师',
	            'level' => 6,
	            'menu' => '["1","2","3","5","8","16","17","18","12"]',
	            'permissions' => '["web","web-create","web-show","web-edit","web-permission","web-import","order-manager","myorder","myinput",
	            				   "progress-tongji","edit-info-edit","other-order","other-order-create","other-order-delete","lan","lan-edit",
	            				   "contract-customer"]',
	        ],
	        [
	            'name' => '客服',
	            'level' => 5,
	            'menu' => '["1","2","5","6","7","13","14","15","10","11","12"]',
	            'permissions' => '["web","web-create","web-show","web-edit","web-renew","web-delete","web-permission","web-import","order-manager","renew",
	            				   "customer","customer-edit","customer-delete","customer-show","customer-move","contract","user","user-create",
	            				   "user-edit","user-delete","group","group-create","group-edit","group-delete","department","department-create",
	            		           "department-edit","department-delete","edit-info-edit","lan","lan-create","lan-edit","lan-delete","contract-customer"]', 
	        ],
	        [
	            'name'  => '业务经理',
	            'level' => 4,
	            'menu'  => '["5","6","12"]',
	            'permissions' => '["web-show","web-import","order-manager","customer","customer-edit","customer-show","edit-info-edit"]',
	        ],
	        [
	            'name'  => '业务员',
	            'level' => 3,
	            'menu'  => '["5","6","12"]',
	            'permissions' => '["web-show","web-import","order-manager","customer","customer-edit","customer-show","edit-info-edit"]',
	        ]
    	));
    }
}
